Auto-responder for cases where profile is not yet loaded
This commit is contained in:
parent
40781a514d
commit
ecd253be78
|
@ -545,6 +545,8 @@ class State implements Interfaces.State {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void core.cache.queueForFetching(character.name);
|
||||||
|
|
||||||
conv = new PrivateConversation(character);
|
conv = new PrivateConversation(character);
|
||||||
this.privateConversations.push(conv);
|
this.privateConversations.push(conv);
|
||||||
this.privateMap[key] = conv;
|
this.privateMap[key] = conv;
|
||||||
|
|
|
@ -27,10 +27,8 @@
|
||||||
<match-tags v-if="match" :match="match"></match-tags>
|
<match-tags v-if="match" :match="match"></match-tags>
|
||||||
|
|
||||||
<div class="filter-matches" v-if="smartFilterIsFiltered">
|
<div class="filter-matches" v-if="smartFilterIsFiltered">
|
||||||
<h4>Smart Filter Matches</h4>
|
<span class="matched-tags">
|
||||||
|
<span v-for="filterName in smartFilterDetails" class="mismatch smart-filter-tag" :class="filterName"><i class="fas fa-solid fa-filter"></i> {{ (smartFilterLabels[filterName] || {}).name }}</span>
|
||||||
<span class="tags">
|
|
||||||
<span v-for="filterName in smartFilterDetails" class="smart-filter-tag" :class="filterName">{{ (smartFilterLabels[filterName] || {}).name }}</span>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -471,8 +469,7 @@ export default class CharacterPreview extends Vue {
|
||||||
|
|
||||||
.status-message,
|
.status-message,
|
||||||
.latest-ad-message,
|
.latest-ad-message,
|
||||||
.conversation,
|
.conversation {
|
||||||
.filter-matches {
|
|
||||||
display: block;
|
display: block;
|
||||||
background-color: rgba(0,0,0,0.2);
|
background-color: rgba(0,0,0,0.2);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -481,20 +478,7 @@ export default class CharacterPreview extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-matches {
|
.filter-matches {
|
||||||
.tags {
|
margin-top: 0.75em;
|
||||||
margin-top: 10px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smart-filter-tag {
|
|
||||||
display: inline-block;
|
|
||||||
color: var(--messageTimeFgColor);
|
|
||||||
margin-right: 4px;
|
|
||||||
background-color: var(--messageTimeBgColor);
|
|
||||||
border-radius: 2px;
|
|
||||||
padding-left: 3px;
|
|
||||||
padding-right: 3px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.character-avatar {
|
.character-avatar {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { NoteCheckerCount } from '../../site/note-checker';
|
||||||
* 'imagepreview-show': {url: string}
|
* 'imagepreview-show': {url: string}
|
||||||
* 'imagepreview-toggle-stickyness': {url: string}
|
* 'imagepreview-toggle-stickyness': {url: string}
|
||||||
* 'character-data': {character: Character}
|
* 'character-data': {character: Character}
|
||||||
* 'character-score': {character: Character, score: number}
|
* 'character-score': {character: Character, score: number, isFiltered: boolean}
|
||||||
* 'private-message': {message: Message}
|
* 'private-message': {message: Message}
|
||||||
* 'channel-ad': {message: Message, channel: Conversation, profile: ComplexCharacter | undefined}
|
* 'channel-ad': {message: Message, channel: Conversation, profile: ComplexCharacter | undefined}
|
||||||
* 'channel-message': {message: Message, channel: Conversation}
|
* 'channel-message': {message: Message, channel: Conversation}
|
||||||
|
|
|
@ -128,7 +128,8 @@ export class CacheManager {
|
||||||
'character-score',
|
'character-score',
|
||||||
{
|
{
|
||||||
character: c,
|
character: c,
|
||||||
score
|
score,
|
||||||
|
isFiltered
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -144,7 +145,11 @@ export class CacheManager {
|
||||||
const conv = core.conversations.getPrivate(char, true);
|
const conv = core.conversations.getPrivate(char, true);
|
||||||
|
|
||||||
if (conv && conv.messages.length > 0 && Date.now() - _.last(conv.messages)!.time.getTime() < 3 * 60 * 1000) {
|
if (conv && conv.messages.length > 0 && Date.now() - _.last(conv.messages)!.time.getTime() < 3 * 60 * 1000) {
|
||||||
await testSmartFilterForPrivateMessage(char);
|
const allMessagesFromThem = _.every(conv.messages, (m) => ('sender' in m) && m.sender.name === conv.character.name);
|
||||||
|
|
||||||
|
if (allMessagesFromThem) {
|
||||||
|
await testSmartFilterForPrivateMessage(char);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -798,7 +798,9 @@ export const kinkComparisonSwaps: Record<any, number> = {
|
||||||
513: 515, // cunnilingus giving -> receiving
|
513: 515, // cunnilingus giving -> receiving
|
||||||
515: 513, // cunnilingus receiving -> giving
|
515: 513, // cunnilingus receiving -> giving
|
||||||
141: 158, // oral sex giving -> receiving
|
141: 158, // oral sex giving -> receiving
|
||||||
158: 141 // oral sex receiving -> giving
|
158: 141, // oral sex receiving -> giving
|
||||||
|
512: 514, // fellatio performing -> fellatio receiving
|
||||||
|
514: 512 // fellatio receiving -> fellatio performing
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue